package com.example.controller;

import com.example.entity.Notice;
import com.example.entity.RespBean;
import com.example.mapper.NoticeMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 测试用
 *
 * @author: liu
 * 2022-04-17-23:10
 **/
@Api(tags = "testController")
@RestController
@ResponseBody
@RequestMapping("/test")
public class testController {

    @Autowired
    private NoticeMapper noticeMapper;

    @ApiOperation(value = "查询所有公告")
    @GetMapping(value = "/query-all-notices")
    public RespBean testQueryAllNotices(){

        return RespBean.success("query-all-notices");

    }

    @ApiOperation(value = "新增一条公告")
    @GetMapping(value = "/add-notice")
    public RespBean testAddNotice(){
        return RespBean.success("add-notice");

    }

}
